<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="<?php echo base_url() ?>css/reset.css" type="text/css" rel="stylesheet" media="screen" />
        <link href="<?php echo base_url() ?>css/style.css" type="text/css" rel="stylesheet" media="screen" />
        <title>fashion woman</title>
    </head>
    <body>
<div id="main_box">
    <h1>Chức năng quản lý chủng loại sản phẩm</h1>
    <div class="cleared">
<?php
echo anchor(base_url() . 'chungloai/add/', 'Thêm loại mới');
?>
<br /><br />
<?php
                    if (!$results) {
                        echo '<h1>No Data</h1>';
                        exit;
                    }
                    ?>
                     <?php
                        foreach ($results as $result) {
                    ?>
<div class="containner" style="margin-right: 5px;">
    <div class="product_container" style="background: border-box">
                            <div class="img_productContent" style="float: left;margin-right: 10px;">
                                <ul>
                                    <li>
                                        <?php echo "<img src ='".  base_url()."upload/img_product/".$result -> hinhdaidien."' style='width:130px;height:130px;' />";?>
                                    </li>
                                    <li>
                                        <p style="text-align: center;">
                                             <?php echo anchor(base_url() . 'chungloai/edit/' . $result->ma_chung_loai, 'Edit');?>
                                            | <?php echo anchor(base_url() . 'chungloai/delete/' . $result->ma_chung_loai, 'Delete', array('onClick' => 'return deletechecked(\' ' . base_url() . 'chungloai/delete/' . $result->ma_chung_loai . ' \')'));?>
                                        </p>
                                    </li>
                                </ul>
                            </div>
                            <div class="product_detail">
                                <ul>
                                    <li><span class="highlightor" >ma_chung_loai:</span><?php echo $result-> ma_chung_loai ?></li>
                                    <li><span class="highlightor" >ten_chung_loai: </span><?php echo $result-> ten_chung_loai ?></li>
                                    <li><span class="highlightor" >tieude__chungloai_sp: </span><?php echo $result-> tieude__chungloai_sp ?></li>
                                    <li><span class="highlightor" >gioithieu: </span><?php echo $result-> gioithieu ?></li>
                                    <li><span class="highlightor" >thu_tu: </span><?php echo $result-> thu_tu ?></li>
                                    <!--<li><span class="highlightor" >hinhdaidien: </span><?php // echo $result-> hinhdaidien ?></li>-->
                                    <li><span class="highlightor" >AnHien </span><?php echo ($result-> AnHien == 1)?"Hiện ở trang chủ":"Ẩn ở trang chủ"?></li>
                                </ul>
                            </div>
                        </div>
                     
                     <?php
                     echo "<div class='cleared'></div>";
                        }
                        ?>
</div>
</div>
    </body>
</html>

<script type="text/javascript">
function deletechecked(link)
{
    var answer = confirm('Delete item?')
    if (answer){
        window.location = link;
    }
    
    return false;  
}

</script>